from tkinter import *
from tkinter import ttk


def click(event):
    canvas.delete("all")
    global x
    global y
    global k
    global points
    x = int(text1.get())
    y = int(text2.get())
    k = int(text3.get())

    print(x)
    print(y)
    print(k)
    points = [
        (x, y),
        (x, y + 20 * k),
        (x + 10 * k, y + 20 * k),
        (x + 10 * k, y + 30 * k),
        (x + 20 * k, y + 30 * k),
        (x + 20 * k, y + 10 * k),
        (x + 10 * k, y + 10 * k),
        (x + 10 * k, y),
    ]
    print(points)
    canvas.create_polygon(*points, fill="black")


root = Tk()
root.title("123")
root.geometry("900x700")

canvas = Canvas(bg="white", width=500, height=500)
canvas.pack(anchor=CENTER, expand=1)

text1 = ttk.Entry()
text1.pack(anchor=NW, padx=8, pady=8)
text2 = ttk.Entry()
text2.pack(anchor=NW, padx=8, pady=8)
text3 = ttk.Entry()
text3.pack(anchor=NW, padx=8, pady=8)

btn = ttk.Button(text="Кнопка")
btn.bind('<Button-1>', click)
btn.pack()

root.mainloop()